﻿
/*********************************************************************************
--时间：2012-12-17 09:48:32
--作者：jjpeng
--邮箱：ling121211@gmail.com
--说明：Mongodb过滤器
 * 
 * 基于官方驱动 V2.2.1版本
 * 
 * 字段过滤类
--
*********************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MongoDB.Driver;
using MongoDB.Driver.Builders;
using MongoDB.Bson;

namespace PCC.Framework.Mongodb
{
    public class MongoDBFields
    {
        private IMongoFields _fields;

        private MongoDBFields(IMongoFields fields)
        {
            _fields = fields;
        }

        public IMongoFields Field
        {
            get
            {
                return _fields;
            }
        }

        public static MongoDBFields Include(params string[] names)
        {
            return new MongoDBFields(Fields.Include(names));
        }

        public static MongoDBFields Exclude(params string[] names)
        {
            return new MongoDBFields(Fields.Exclude(names));
        }
    }
}
